import type { Posts } from "./post";

export interface Category {
  id: number;
  name: string;
  posts?: Array<Posts>;
  createTime: Date;
  updateTime: Date;
}
export interface CategoryShow {
  id: number;
  name: string;
}
export const findAll = () => {
  return useServerRequest<CategoryShow[]>("/categories", {
    method: "GET",
  });
};
